package cn.yang.domain.strategy.service.armory;

import cn.yang.domain.strategy.model.valobj.StrategyAwardStockKeyVO;

import java.util.Date;

/**
 * @version v1.0
 * @ClassName: cn.yang.domain.strategy.service.armory
 * @Description: 策略抽奖的调度
 * @Author: YJ
 */
public interface IStrategyDispatch {
    /**
     * 获取抽奖策略的随机奖品ID
     *
     * @param strategyId 抽奖策略ID
     * @return 抽奖奖品ID
     */
    Integer getRandomAwardId(Long strategyId);
    /**
     * 获取抽奖策略的随机奖品ID
     *
     * @param strategyId 抽奖策略ID
     * @param ruleWeightValue 规则权重值
     * @return 抽奖奖品ID
     */
    Integer getRandomAwardId(Long strategyId, String ruleWeightValue);

    /**
     * 扣减奖品库存
     *
     * @param strategyId 策略ID
     * @param awardId 奖品ID
     * @return 扣减结果
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);

}
